cmake_minimum_required(VERSION 3.10) #cmake版本要求

project(HIK_TEST)#工程名

set(CMAKE_CXX_STANDARD 11)#编译时c++标准

set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/bin)#可执行文件输出路径

set(INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include)#头文件路径

set(HCNetSDK_LIB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib)#库文件路径

file(GLOB_RECURSE HCNetSDK_LIBS ${HCNetSDK_LIB_DIR} "*.so")#库文件


set(SOURCES 
main.cpp
src/hik_camera.cpp
src/http_server.cpp)#源文件

link_directories(${LIB_DIR})#连接库文件路径

# opencv
# find_package(OpenCV REQUIRED)

 
#HCNetSDK .so

add_executable(main ${SOURCES})#添加可执行文件

target_include_directories(main PRIVATE
${INCLUDE_DIR})#包含头文件

target_link_libraries(main
${HCNetSDK_LIBS}
pthread)#连接动态库